// complex demo
// Created by Administrator on 2025/6/26.
// 对复数的运算

#include <complex>
#include <iostream>
using namespace std;

int main(int argc, char *argv[]) {
    const complex<double> c1(5.0, 3.0);
    const complex<double> c2(2.0, -4.0);

    cout << "c1 value:\t" << c1 << endl;
    cout << "c2 value:\t" << c2 << endl;

    const complex<double> addValue = c1 + c2;
    cout << "c1 + c2 = " << addValue << endl;

    const complex<double> subValue = c1 - c2;
    cout << "c1 - c2 = " << subValue << endl;

    const complex<double> mulValue = c1 * c2;
    cout << "c1 * c2 = " << mulValue << endl;

    const complex<double> divValue = c1 / c2;
    cout << "c1 / c2 = " << divValue << endl;

}
